<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>后台管理页面</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/static/admin/css/main.css" />
    <script
      type="text/javascript"
      src="/static/admin/js/jquery-1.12.4.min.js"
    ></script>
    <script>
      window.onload = function() {
        $(".dels").on("click", function() {
         if(confirm("你确定要删除？")){
           return true
         } 
        return false
        });
        $(".sel_opt").change(function(){
          $("#select-articles").submit()
        })
      };
    </script>
  </head>
  <body>
    <div class="header">
      <a href="#" class="logo fl"
        ><img src="/static/admin/img/logo.png" alt="logo"
      /></a>
      <a href="/logout" class="logout fr">退 出</a>
    </div>

    <div class="side_bar">
      <div class="user_info">
        <img src="/static/admin/img/person.png" alt="张大山" />
        <p>欢迎你</p>
      </div>

      <div class="menu_con">
        <div class="first_menu active">
          <a href="javascript:;" class="icon02">文章管理</a>
        </div>
        <ul class="sub_menu show">
          <li><a href="/articles" class="icon031">文章列表</a></li>
          <li><a href="/addArticle" class="icon032">添加文章</a></li>
          <li><a href="/type" class="icon034">添加分类</a></li>
        </ul>
      </div>
    </div>

    {{.LayoutContent}}

    {{if .flash.notice }}
    <span class="flash-msg" style="
    position: fixed;
    left: 50%;
    color: #666;
    font-size: 18px;
    transform: translateX(-50%);
    top: 180px;
    padding: 8px 18px;
    background: #ccc;
    border-radius: 6px;">{{.flash.notice}}</span>
    <script>
      window.onload=function() {
        setTimeout(function(){
          let flashMsg=document.querySelector(".flash-msg")
          flashMsg&&flashMsg.parentNode.removeChild(flashMsg)
        },5000)
      }
    </script>
    {{end}}
</body>
</html>